<template>
  <div>
    <div class="center">
      <el-row :gutter="20">
        <el-col :span="24"><div class="centerTitle">个人信息</div></el-col>
      </el-row>
      <el-form ref="form" :model="form" label-width="70px" label-position="left">
        <el-row :gutter="20">
          <el-col :span="24"><div class="centerTitle2">基本信息</div></el-col>
          <el-col :span="6">
            <el-form-item label="姓名：">
              {{form.real_name}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="性别：">
              {{form.sex_name}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="生日：">
              {{form.birthday}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="学籍号：">
              {{form.student_id}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="账号：">
              {{form.t_id}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="学段：">
              {{form.section_name}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="年级：">
              {{form.grade_name}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="班级：">
              {{form.class_name}}
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <el-form ref="form" :model="form" label-width="170px" label-position="left">
        <el-row :gutter="20">
          <el-col :span="24"><div class="centerTitle2">家庭信息</div></el-col>
          <el-col :span="6">
            <el-form-item label="你是否为独生子女：">
              {{form.only_child_name}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="你家有几个孩子：">
              {{form.child_num.codeName}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="所有孩子中你排第几：">
              {{form.list_which.codeName}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="父亲受教育程度：">
              {{form.father_education.codeName}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="父亲的职业：">
              {{form.dimness_cause_father.codeName}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="父亲的月收入（元）：">
              {{form.monthly_profit_father.codeName}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="父亲希望你完成的学历：">
              {{form.father_hope_education.codeName}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="母亲受教育程度：">
              {{form.mother_education.codeName}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="母亲的职业：">
              {{form.dimness_cause_mother.codeName}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="母亲的月收入（元）：">
              {{form.monthly_profit_mother.codeName}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="母亲希望你完成的学历：">
              {{form.mother_hope_education.codeName}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="父母的婚姻状况：">
              {{form.marital_status.codeName}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="你认为你能完成的学历：">
              {{form.you_can_complete_edu.codeName}}
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
  </div>
</template>
<script>
import {APIPERSONALFILESTUDENTS} from '@/common/api.js'
export default {
  props: ['id'],
  data () {
    return {
      form: {
        child_num: {},
        list_which: {},
        father_education: {},
        dimness_cause_father: {},
        monthly_profit_father: {},
        father_hope_education: {},
        mother_education: {},
        dimness_cause_mother: {},
        monthly_profit_mother: {},
        mother_hope_education: {},
        marital_status: {},
        you_can_complete_edu: {}
      }
    }
  },
  created () {
    this.tableDate()
  },
  methods: {
    tableDate () {
      APIPERSONALFILESTUDENTS({
        uid: this.id
      }).then((res) => {
        if (res.status === 1) {
          this.form = res.data
        } else {
          this.$message.error(res.msg)
        }
      }).catch((err) => {
        this.$message.error(err.msg)
      })
    }
  }
}
</script>
